﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FubiManger.Controls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class imgcontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public imgcontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        public string cover { get; set; }
        public int index { get; set; }
        /// <summary>
        /// 1商品2活动
        /// </summary>
        public string stype { get; set; }
        private void imgcontrol_Load(object sender, EventArgs e)
        {
            if (index == 0)
                lbl.Visible = true;
            else
                lbl.Visible = false;
            imgcover.ResourceID = cover;
        }

        private void pan_img_LongPress(object sender, EventArgs e)
        {
            DialogOptions options = new DialogOptions(LayoutJustifyAlign.FlexEnd);
            options.Padding = Padding.Empty;
            Updateimgcontrol con = new Updateimgcontrol();
            con.index = index;
            con.stype = stype;
            this.Form.ShowDialog(con, options);
        }
    }
}